package com.ruoyi.system.domain;

import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.ToString;
import lombok.extern.slf4j.Slf4j;

import java.io.Serializable;
import java.util.Date;

/**
 * 主机表(THost)实体类
 *
 * @author stone
 * @since 2022-04-15 17:04:45
 */


@Data
@ToString
@Slf4j
public class THost extends BaseEntity implements Serializable {
    private static final long serialVersionUID = -53791916867239819L;
    private Integer id;

    private String hostname;

    private String username;

    private String passwd;

    private Integer port;

    private String remark;

    private String name;

    private Integer creator;

    private Date createTime;

    private Date modifyTime;

    private Integer modifier;
    private Date startTime;
    private Date endTime;

    public THost() {
        log.error("调用构造方法 ====> {}", Thread.currentThread().getName());
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        THost host = (THost) o;

        if (!hostname.equals(host.hostname)) return false;
        return username.equals(host.username);
    }

    @Override
    public int hashCode() {
        int result = hostname.hashCode();
        result = 31 * result + username.hashCode();
        return result;
    }
}
